package cn.mesmile.shiro.module.user.mapper;

import cn.mesmile.shiro.module.user.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zb
 * @date 2021/02/04 15:09
 */
public interface UserMapper extends BaseMapper<User> {

    /**
     *  通过用户名来获取用户
     * @param username
     * @return
     */
    @Select("select  * from `user` where username = #{username}")
    User findByUsername(@Param("username") String username);


}
